package com.xinzhitong.www.service;

import com.xinzhitong.www.exception.*;
import com.xinzhitong.www.pojo.ExamLocation;
import com.xinzhitong.www.pojo.ExamTime;

import java.util.List;
import java.util.Map;

/**
 * 证书模块
 *
 * @author 钟伟良
 */
public interface CredentialService {

    /**
     * 证书id获取证书介绍
     *
     * @param id 证书id
     * @return 证书介绍
     * @throws CredentialIntroductionException 证书介绍异常
     */
    String introduction(Integer id) throws CredentialIntroductionException;

    /**
     * 证书id查询证书要求
     *
     * @param credentialId 证书id
     * @return 证书要求
     * @throws CredentialRequestException 没有证书要求异常
     */
    List<String> request(Integer credentialId) throws CredentialRequestException;

    /**
     * 考证id获取考证地点
     *
     * @param credentialId 考证id
     * @return 考证地点
     * @throws CredentialIntroductionException 考证介绍异常
     */
    List<ExamLocation> location(Integer credentialId) throws CredentialLocationException;

    /**
     * 考证id获取考证场次
     *
     * @param credentialId 考证id
     * @return 考证场次
     * @throws CredentialTimeException 考证场次异常
     */
    List<ExamTime> time(Integer credentialId) throws CredentialTimeException;

    /**
     * 证书id查询报名要求
     *
     * @param credentialId 证书id
     * @return 报名要求
     * @throws CredentialRequestException 没有证书要求异常
     */
    List<String> checked(Integer credentialId) throws CredentialCheckedRequireException;

    /**
     * 证书id获取证书图片
     *
     * @param id 证书id
     * @return 证书图片
     */
    String picture(Integer id);

    /**
     * 工种id获取证书概览
     *
     * @param professionId 工种id
     * @return 证书概览
     * @throws CredentialGeneralException 证书概览异常
     */
    List<Map<String, Object>> general(Integer professionId) throws CredentialGeneralException;

    /**
     * 插入考证报名
     *
     * @param timeId 考证时间id
     */
    void examTime(Integer timeId);

}
